#include <stdio.h>
#include "operar.h"

int main(int argc, char *argv[])
{
    int a,b,r;
    Error error = correct_args(argc, argv);
    const char *program = argv[0];
    if(error)
    {
        usage(program, error);
        exit(1);
    }
    a = atol(argv[1]);
    b = atol(argv[3]);
    char op = argv[2][0];
    operate(&r, a, b, op);
    printf("%d %c %d = %d\n", a, op, b, r);
}
